<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="jquery-3.1.0.js"></script>
</head>
<body>

</body>
<script>
   /* var data = [
        { name: 'jim1', age: 19, gender: 'male' },
        { name: 'jim2', age: 18, gender: 'female' },
        { name: 'jim3', age: 20, gender: 'female' },
        { name: 'jim4', age: 21, gender: 'male' },
        { name: 'jim5', age: 19, gender: 'female' },
        { name: 'jim6', age: 18, gender: 'male' }
    ];

    function cTag(tagNme){
        return  document.createElement('tagName');
    }
    var table = cTag('table');
    var tbody = cTag('tbody');
    //jq中each方法中回调函数是kv的形式
    $.each(data,function(k,v){
        //根基V生成tr
        var tr = cTag('tr');
        //遍历v生成td
        $.each(v,function(key,value){
            var td = cTag('td');
            var txt = document.createTextNode( value+'');
            td.appendChild(txt);
            tr.appendChild(td);
        });
        tbody.appendChild(tr);
    })

    table.appendChild(tbody);
    table.border = '1';
    table.width = '400';
    document.body.appendChild(table);
*/

    var arr = [1,2,3,4,5,6,7,8,9];
   $.each(arr,function(i,v){
       console.log(i + '===' + v);
   });

  var arry = $.map(arr,function(v,i){
       return v*2;
   });
   console.log(arry);
</script>
</html>